###############################################################
#                                                             #
#	AI Events (Hidden Effects for AI countries)               #
#                                                             #
#	ID range 30100 -                                          #
#                                                             #
###############################################################

#########################################################################
#  Prussia begins colonizing
#########################################################################
#event = {
#	id = 30100
#	random = no
#	country = PRU
#
#	trigger = {
#		ai = yes
#		NOT = { event = 30101 }
#		OR = {
#			event = 4632 # Three Hurrays for the German Empire
#			prestige = 2000
#			colonialnation = player
#			random = 1
#		}
#	}
#
#	name = "AI_EVENT"
#	desc = "AI_EVENT"
#	style = 0
#
#	date = { day = 20 month = january year = 1861 }
#	offset = 20
#	deathdate = { day = 30 month = december year = 1920 }
#
#	action_a = {
#		command = { type = ai which = "PRU_col.ai" }
#	}
#}
#########################################################################
#  Germany begins colonizing
#########################################################################
#event = {
#	id = 30101
#	random = no
#	country = GER
#
#	trigger = {
#		ai = yes
#		NOT = { event = 30100 }
#		NOT = { local_flag = { name = germany_1914 value = 1 } }
#		OR = {
#			event = 4632 # Three Hurrays for the German Empire
#			prestige = 2000
#			colonialnation = player
#			random = 2
#		}
#	}
#
#	name = "AI_EVENT"
#	desc = "AI_EVENT"
#	style = 0
#
#	date = { day = 20 month = january year = 1861 }
#	offset = 20
#	deathdate = { day = 30 month = december year = 1920 }
#
#	action_a = {
#		command = { type = ai which = "PRU_col.ai" }
#	}
#}


#########################################################################
#  Belgian AI switch 1848
#########################################################################
event = {
	id = 30150
	random = no
	country = BEL

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1848 }

	action_a = {
		command = { type = ai which = "BEL_1848.ai" }
	}
}
#########################################################################
#  Belgian AI switch 1865
#########################################################################
event = {
	id = 30151
	random = no
	country = BEL

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1865 }

	action_a = {
		command = { type = ai which = "BEL_1865.ai" }
	}
}
#########################################################################
#  Belgian AI switch 1890
#########################################################################
event = {
	id = 30152
	random = no
	country = BEL

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1890 }

	action_a = {
		command = { type = ai which = "BEL_1890.ai" }
	}
}

#########################################################################
#  Japan changes behaviour after the Meiji Restoration
#########################################################################
event = {
	id = 30153
	random = no
	country = NIP

	trigger = {
		ai = yes
		OR = {
			event = 12606
			event = 12607
			event = 12608
			event = 12609
			event = 12610
			event = 7403 # HOL
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1860 }
	offset = 7
	deathdate = { day = 30 month = december year = 1920 }


	action_a = {
		command = { type = ai which = "NIP_REST.ai" }
	}
}
#########################################################################
#  German AI switch 1913
#########################################################################
#event = {
#	id = 30154
#	random = no
#	country = GER
#
#	trigger = {
#		ai = yes
#	}
#
#	name = "AI_EVENT"
#	desc = "AI_EVENT"
#	style = 0
#
#	date = { day = 1 month = january year = 1913 }
#
#	action_a = {
#		command = { type = ai which = "GER_1914.ai" }
#	}
#}
#########################################################################
#  UK AI switch 1913
#########################################################################
event = {
	id = 30155
	random = no
	country = ENG

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "ENG_1914.ai" }
	}
}
#########################################################################
#  French AI switch 1913
#########################################################################
event = {
	id = 30156
	random = no
	country = FRA

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "FRA_1914.ai" }
	}
}
#########################################################################
#  Austrian AI switch 1913
#########################################################################
event = {
	id = 30157
	random = no
	country = AUS

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "AUS_1914.ai" }
	}
}
#########################################################################
#  Russian AI switch 1913
#########################################################################
event = {
	id = 30158
	random = no
	country = RUS

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "RUS_1914.ai" }
	}
}
#########################################################################
#  Italian AI switch 1913
#########################################################################
event = {
	id = 30159
	random = no
	country = ITA

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "ITA_1914.ai" }
	}
}
#########################################################################
#  Belgian AI switch 1913
#########################################################################
event = {
	id = 30160
	random = no
	country = BEL

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "BEL_1914.ai" }
	}
}
#########################################################################
#  Turkish AI switch 1913
#########################################################################
event = {
	id = 30161
	random = no
	country = TUR

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1913 }

	action_a = {
		command = { type = ai which = "TUR_1914.ai" }
	}
}
#########################################################################
#  USA AI switch 1881
#########################################################################
event = {
	id = 30162
	random = no
	country = USA

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1881 }

	action_a = {
		command = { type = ai which = "USA_1881.ai" }
	}
}
#########################################################################
#  CSA AI switch 1881
#########################################################################
event = {
	id = 30163
	random = no
	country = CSA

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1881 }

	action_a = {
		command = { type = ai which = "CSA_1881.ai" }
	}
}
#########################################################################
#  Sweden grants independence to Norway - Should be a real event, but...
#########################################################################
event = {
	id = 30164
	random = no
	country = SWE

	trigger = {
		ai = yes
		random = 75
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 6 month = june year = 1905 }

	action_a = {
		command = { type = independence which = NOR }
	}
}

#########################################################################
#  Italian Unification AI switch
#########################################################################
event = {
	id = 30165
	random = no
	country = ITA

	trigger = {
		ai = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1836 }
	offset = 10
	deathdate = { day = 20 month = december year = 1912 }

	action_a = {
		command = { type = ai which = "ITA.ai" }
	}
}

################################################## 
# Austrian Intervention Against PRU expansion in N Germany (by OHGamer)
################################################## 
event = {
	id = 30166
	random = no
	country = AUS

	trigger = {
		ai = yes
		OR = {
		war = { country = PRU country = MEC } #states that have alliance w/Austria but invalid against PRU, creates exploit for PRU player
		war = { country = PRU country = BRA }
		war = { country = PRU country = FRM }
		war = { country = PRU country = HED }
		war = { country = PRU country = HEK }
		war = { country = PRU country = LIP }
		war = { country = PRU country = OLD }
		war = { country = PRU country = LUB }
		war = { country = PRU country = HAM }
		war = { country = PRU country = NAS }
		war = { country = PRU country = BRE }
		}
		war = { country = PRU country = BAY }
		NOT = {
			war = { country = PRU country = AUS }
				}
		random = 20
		}

	date = { day = 3 month = january year = 1836 }
	offset = 10
	deathdate = { day = 15 month = december year = 1865 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = PRU } 
		command = { type = relation  which = PRU  value = -200 }
	}
}

################################################## 
# Prussian Intervention Against AUS expansion in S Germany (by OHGamer)
################################################## 
event = {
	id = 30167
	random = no
	country = PRU

	trigger = {
		ai = yes
		OR = {
		war = { country = AUS country = ANH } #states that have alliance w/Prussia but invalid against AUS, creates exploit for AUS player
		war = { country = AUS country = BAD }
		war = { country = AUS country = BAY }
		war = { country = AUS country = COB }
		war = { country = AUS country = FRM }
		war = { country = AUS country = HED }
		war = { country = AUS country = HEK }
		war = { country = AUS country = MEI }
		war = { country = AUS country = SAX }
		war = { country = AUS country = WEI }
		war = { country = AUS country = WUR }
		}
		war = { country = AUS country = MEC }
		NOT = {
			war = { country = PRU country = AUS }
				}
		random = 20
		}

	date = { day = 3 month = january year = 1836 }
	offset = 10
	deathdate = { day = 15 month = december year = 1865 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = AUS } 
		command = { type = relation  which = PRU  value = -200 }
	}
}

#########################################################################
#  Establishing the French Protectorate over Luang Prabang (AI-AI) (by OHGamer)
#########################################################################
event = {
	id = 30168
	random = no
	country = FRA

	trigger = {
		exists = LUA	
		ai = yes
		ai = LUA
		war = { country = FRA country = LUA }		
		control = { province = 2006 data = FRA }		
	}

	name = "AI_Event"
	desc = "AI_Event"
	style = 0

	date = { day = 1 month = february year = 1837 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "AI_Event" #  
		command = { type = peace which = LUA value = 0 } 		
 		command = { type = make_satellite which = LUA }
	}
}

#########################################################################
#  Transfer of Lands to Laos (AI-AI) (by OHGamer)
#########################################################################
event = {
	id = 30169
	random = no
	country = LUA

	trigger = {
		event = 30168
		exists = ANN
		exists = FRA
		ai = yes
		ai = ANN
		ai = FRA
		OR = {
			owned = { province = 2001 data = FRA } 
			AND = {
				owned = { province = 2001 data = ANN }  
				satellite = { country = ANN country = FRA }
				}		
			} 
		OR = {
			owned = { province = 2003 data = FRA } 
				AND = {
				owned = { province = 2003 data = ANN }  
				satellite = { country = ANN country = FRA }
				}		
			} 
	}

	name = "AI_Event"
	desc = "AI_Event"
	style = 0

	date = { day = 1 month = february year = 1837 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "AI_Event" #  
		command = { type = receiveprovince which = 2001 } 		
 		command = { type = receiveprovince which = 2003 }
	}
}



#########################################################################
#  SAR AI HELPER
#  Annexation of LOM, VEN, LUC, TUS, PAR, MOD and PAP
#########################################################################
event = {
	id = 30170
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = LOM
		ai = LOM
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = LOM }
		}
}
event = {
	id = 30171
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = VEN
		ai = VEN
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = VEN }
		}
}
event = {
	id = 30172
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = LUC
		ai = LUC
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = LUC }
		}
}
event = {
	id = 30173
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = TUS
		ai = TUS
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = TUS }
		}
}
event = {
	id = 30174
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = PAR
		ai = PAR
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = PAR }
		}
}
event = {
	id = 30175
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = MOD
		ai = MOD
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = MOD }
		}
}
event = {
	id = 30176
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = PAP
		ai = PAP
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = PAP }
		}
}
event = {
	id = 30177
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = SIC
		ai = SIC
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = add_division which = infantry where = 1289 }
		command = { type = add_division which = infantry where = 1289 }
		}
}

event = {
	id = 30178
	random = no
	country = AUS

	trigger = {
		ai = yes
		exists = SAR
		ai = SAR
		event = 5801 #Sardina to unify Italy
		war = { country = AUS country = SAR }
		OR = {
			owned = { province = 824 data = AUS } #AUS owns at least 1 Lombardy-Venetia province
			owned = { province = 825 data = AUS }
			owned = { province = 826 data = AUS }
			owned = { province = 838 data = AUS }
			owned = { province = 839 data = AUS }
			}
		OR = {
			control = { province = 825 data = SAR } #AUS losing provinces east of Milan
			control = { province = 826 data = SAR }
			control = { province = 838 data = SAR }
			control = { province = 839 data = SAR }
			}
		}

	date = { year = 1858 }
	offset = 10
	deathdate = { year = 1890 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace  which = SAR value = 1 }
		command = { type = secedestate which = SAR value = 824 when = 0 } #Lombardy to SAR
		}
}

event = {
	id = 30179
	random = no
	country = SAR

	trigger = {
		ai = yes
		exists = SIC
		ai = SIC
		event = 5801 #Sardina to unify Italy
		NOT = {
			alliance = { country = SIC country = FRA } #Sicily not allied with any major power
			alliance = { country = SIC country = AUS }
			alliance = { country = SIC country = PRU }
			alliance = { country = SIC country = GER }
			alliance = { country = SIC country = RUS }
			alliance = { country = SIC country = SPA }
			alliance = { country = SIC country = ENG }
			alliance = { country = SIC country = SWE }
			alliance = { country = SIC country = TUR }
			alliance = { country = SIC country = FRA }
			alliance = { country = SIC country = POR }
			alliance = { country = SIC country = SWI }
			alliance = { country = SIC country = BEL }
			alliance = { country = SIC country = HOL }
		}
		OR = {
			AND = {
			atwar = no
			won_war = { country = SAR country = SIC }
			}
			AND = {
			war = { country = SAR country = SIC }
			war_exhaustion = { country = SIC value = 6 }
			}
		     }			 
		}

	date = { year = 1858 }
	offset = 10
	deathdate = { year = 1890 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit which = SIC }
		}
}

#########################################################################
# Prussia AIs change
#########################################################################
event = {
	id = 30180
	random = no
	country = PRU

	trigger = {
		ai = yes
		local_flag = { name = pru_1836 value = 1 }
		or = {
			atwar = no
			event = 4619 # Otto von Bismarck
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1862 }
	offset = 30
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "PRU_1860.ai" }
		command = { type = establishment which = army_industrial }
#		command = { type = access which = BEL }
#		command = { type = local_clrflag which = pru_1836 } #Keep it to avoid reloading
		}
}

event = {
	id = 30181
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		not = { exists = NGF } #Ger forms via Conservative unification or bismarck wars
		or = {
			local_flag = { name = pru_1836 value = 1 }
			local_flag = { name = pru_1860 value = 1 }
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 30
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "GER_1860.ai" }
		command = { type = relation which = DAN value = 200 } #To avoid further wars 
		command = { type = establishment which = industrialist_science }
#		command = { type = local_clrflag which = pru_1836 } #Keep it to avoid reloading
#		command = { type = local_clrflag which = pru_1860 } #Keep it to avoid reloading
	}
}

event = {
	id = 30182
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		local_flag = { name = ger_1860 value = 1 }
		}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 30
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "GER_1890.ai" }
		command = { type = establishment which = traditional_academic }
#		command = { type = local_clrflag which = ger_1860 } #Keep it to avoid reloading
	}
}
event = {
	id = 30183
	random = no
	country = PRU

	trigger = {
		ai = yes
		OR = { 
			local_flag = { name = pru_1836 value = 1 }
			local_flag = { name = pru_1860 value = 1 }
			}
		atwar = no
		event = 4630 # The Fall of Prussia*
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1870 }
	offset = 30
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "PRU_1890.ai" }
		command = { type = establishment which = traditional_academic }
#		command = { type = local_clrflag which = pru_1836 } #Keep it to avoid reloading
#		command = { type = local_clrflag which = pru_1860 } #Keep it to avoid reloading
		}
}

event = {
	id = 30184
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		exists = NGF #If GER created via Liberal Revolution, should have different AI
		local_flag = { name = pru_1836 value = 1 }
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 30
	deathdate = { year = 1860 }

	action_a = {
		command = { type = ai which = "GER_Liberal.ai" }
		command = { type = relation which = ENG value = 200 } 
		command = { type = relation which = FRA value = 200 } 
		command = { type = relation which = BEL value = 200 } 
		#command = { type = relation which = DAN value = 200 } #To avoid further wars 
		command = { type = establishment which = traditional_academic }
		command = { type = sleepevent which = 30181 } #avoid loading Bismarckian AI
#		command = { type = local_clrflag which = pru_1836 } #Keep it to avoid reloading
#		command = { type = local_clrflag which = pru_1860 } #Keep it to avoid reloading
	}
}

#########################################################################
# GER AI Switch 2 (GER Via Liberal Revolution) (by OHGamer)
#########################################################################
event = {
	id = 30185
	random = no
	country = GER

	trigger = {
		ai = yes
		atwar = no
		event = 30184 #AI for GER via Frankfurt fired
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 20
	deathdate = { year = 1895 }

	action_a = {
		command = { type = ai which = "GERLiberalLate.ai" }
		command = { type = sleepevent which = 30182 } #avoid loading Wilhelmine AI
		}
}

#########################################################################
# AUS AI Switch 1c (AUS Liberal) (by OHGamer)
#########################################################################
event = {
	id = 30186
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		event = 1519 #Hungary broke away
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1848 }
	offset = 20
	deathdate = { year = 1868 }

	action_a = {
		command = { type = ai which = "AUSLiberal.ai" }
		command = { type = sleepevent which = 30328 } #avoid loading reactionary AUS AI files
		command = { type = sleepevent which = 30329 } #avoid loading reactionary AUS AI files
		command = { type = sleepevent which = 30330 } #avoid loading reactionary AUS AI files
		command = { type = sleepevent which = 30331 } #avoid loading reactionary AUS AI files
		}
}

#########################################################################
# AUS AI Switch 2c (AUS Liberal) (by OHGamer)
#########################################################################
event = {
	id = 30187
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		event = 30186 
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1872 }
	offset = 20
	deathdate = { year = 1889 }

	action_a = {
		command = { type = ai which = "AUSLiberalMiddle.ai" }
		}
}

#########################################################################
# AUS AI Switch 3 (AUS Liberal) (by OHGamer)
#########################################################################
event = {
	id = 30188
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		event = 30187 
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1893 }
	offset = 20
	deathdate = { year = 1903 }

	action_a = {
		command = { type = ai which = "AUSLiberalLate.ai" }
		}
}


#########################################################################
# Denmark AIs change
#########################################################################
event = {
	id = 30190
	random = no
	country = DAN

	trigger = {
		ai = yes
		random = 50
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1836 }
	offset = 100
	deathdate = { year = 1860 }

	action_a = {
		command = { type = establishment which = radical_academic }
		}
}
event = {
	id = 30191
	random = no
	country = DAN

	trigger = {
		ai = yes
		random = 50
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1860 }
	offset = 100
	deathdate = { year = 1890 }

	action_a = {
		command = { type = establishment which = naval_industrial }
		}
}
event = {
	id = 30192
	random = no
	country = DAN

	trigger = {
		ai = yes
		atwar = no
		local_flag = { name = dan_1836 value = 1 }
		OR = {
			technology = 5104 # Semi-Automatization
			technology = 5405 # Electricity
			invention = 512 # Machine Tools
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1870 }
	offset = 100
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "DAN_1890.ai" }
		command = { type = establishment which = banker_science } # or industrialist?
#		command = { type = local_clrflag which = pru_1836 } #Keep it to avoid reloading
		}
}

#########################################################################
# Shall We Pass? Military access events by Generalisimo
#########################################################################
event = {
	id = 30200
	random = no
	country = BAY
#	persistent = yes

	trigger = {
		ai = yes
		exists = BAY
		exists = PRU
		ai = PRU
		or = {
			war = { country = PRU country = FRA }
			war = { country = PRU country = SWI }
			}
		not = {
			war = { country = PRU country = BAY }
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1840 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = access which = PRU }
		}
}

#########################################################################
# ENG AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30300
	random = no
	country = ENG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = ENG country = RUS }
			year = 1857
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1854 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "ENGmiddle.ai" }
		}
}

#########################################################################
# ENG AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30301
	random = no
	country = ENG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER 
			year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1919 }

	action_a = {
		command = { type = ai which = "ENGlate.ai" }
		}
}


#########################################################################
# RUS AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30302
	random = no
	country = RUS

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = TUR country = RUS }
			won_war = { country = ENG country = RUS }
			won_war = { country = FRA country = RUS }
			won_war = { country = PRU country = RUS }
			won_war = { country = AUS country = RUS }
			year = 1865 
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1859 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "RUSmiddle.ai" }
		}
}

#########################################################################
# RUS AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30303
	random = no
	country = RUS

	trigger = {
		ai = yes
		atwar = no
		NOT = {
			exists = KOK
			exists = KHI
			exists = BUK
			}
		OR = {
			exists = BUL
			civilized = NIP
			year = 1890 
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 10
	deathdate = { year = 1915 }

	action_a = {
		command = { type = ai which = "RUSlate.ai" }
		}
}
#########################################################################
# FRA AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30304
	random = no
	country = FRA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = FRA country = RUS }
			year = 1857
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1854 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "FRAmiddle.ai" }
		}
}

#########################################################################
# FRA AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30305
	random = no
	country = FRA

	trigger = {
		ai = yes
		atwar = no
		OR = {
		event = 7237 #La Commune
		year = 1880
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1872 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "FRAlate.ai" }
		}
}

#########################################################################
# TUR AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30306
	random = no
	country = TUR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = TUR country = EGY }
			year = 1846
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1839 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "TURmiddle.ai" }
		command = { type = relation which = EGY value = 200 } #To halt cycle of wars  
		}
}


#########################################################################
# TUR AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30307
	random = no
	country = TUR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 1347 data = TUR } #Turks conquer Cyrenaica
			owned = { province = 1810 data = TUR } #Turks conquer Cyrenaica
			won_war = { country = RUS country = TUR }
			exists = BUL
			year = 1880
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "TURlate.ai" }
		}
}

#########################################################################
# USA AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30308
	random = no
	country = USA

	trigger = {
		ai = yes
		atwar = no
		won_war = { country = USA country = MEX }
		AND = {
			OR = {
				owned = { province = 518 data = USA } #USA has reached California Coast
				owned = { province = 516 data = USA }
				owned = { province = 519 data = USA }
				owned = { province = 521 data = USA }
				owned = { province = 1143 data = USA }
			}
			OR = {
				owned = { province = 1187 data = USA } #USA has reached Rio Grande 
				owned = { province = 2859 data = USA }
				owned = { province = 1188 data = USA }
			}
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1845 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "USAmiddle.ai" }
		command = { type = relation which = MEX value = 50 } #To halt cycle of wars with MEX
		command = { type = sleepevent which = 30162 } #USA1881 AI
		}
}

#########################################################################
# USA AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30309
	random = no
	country = USA

	trigger = {
		ai = yes
		atwar = no
		AND = {
			OR = {
				owned = { province = 518 data = USA } #USA has reached California Coast
				owned = { province = 516 data = USA }
				owned = { province = 519 data = USA }
				owned = { province = 521 data = USA }
				owned = { province = 1143 data = USA }
			}
			OR = {
				owned = { province = 1187 data = USA } #USA has reached Rio Grande 
				owned = { province = 2859 data = USA }
				owned = { province = 1188 data = USA }
			}
		NOT = {
			exists = CSA
			}
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "USAlate.ai" }
		}
}

#########################################################################
# SPA AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30310
	random = no
	country = SPA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 7708
			year = 1865
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1861 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "SPAmiddle.ai" }
		}
}

#########################################################################
# SPA AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30311
	random = no
	country = SPA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 7707
			exists = CUB #Cuba set free
			year = 1900
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "SPAlate.ai" }
		}
}

#########################################################################
# MEX AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30312
	random = no
	country = MEX

	trigger = {
		ai = yes
		atwar = no
		won_war = { country = USA country = MEX }
		AND = {
			OR = {
			owned = { province = 518 data = USA } #USA has reached California Coast
			owned = { province = 516 data = USA }
			owned = { province = 519 data = USA }
			owned = { province = 521 data = USA }
			owned = { province = 1143 data = USA }
			}
			OR = {
				owned = { province = 1187 data = USA } #USA has reached Rio Grande 
				owned = { province = 2859 data = USA }
				owned = { province = 1188 data = USA }
			}
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1845 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "MEXmiddle.ai" }
		command = { type = relation which = USA value = 100 } #To halt cycle of wars with USA
		}
}

#########################################################################
# MEX AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30313
	random = no
	country = MEX

	trigger = {
		ai = yes
		atwar = no
		AND = {
			OR = {
			owned = { province = 518 data = USA } #USA has reached California Coast
			owned = { province = 516 data = USA }
			owned = { province = 519 data = USA }
			owned = { province = 521 data = USA }
			owned = { province = 1143 data = USA }
			}
			OR = {
				owned = { province = 1187 data = USA } #USA has reached Rio Grande 
				owned = { province = 2859 data = USA }
				owned = { province = 1188 data = USA }
			}
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1915 }

	action_a = {
		command = { type = ai which = "MEXlate.ai" }
		}
}

#########################################################################
# EGY AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30314
	random = no
	country = EGY

	trigger = {
		ai = yes
		atwar = no
		OR = {
		won_war = { country = TUR country = EGY }
		year = 1850
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1839 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "EGYmiddle.ai" }
		command = { type = relation which = TUR value = 200 } #To halt cycle of wars  
		}
}

#########################################################################
# EGY AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30315
	random = no
	country = EGY

	trigger = {
		ai = yes
		atwar = no
		OR = {
		civilized = yes
		is_satellite = EGY
		won_war = { country = ENG country = EGY }
		won_war = { country = FRA country = EGY }
		year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1875 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "EGYlate.ai" }
		}
}

#########################################################################
# SAR AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30316
	random = no
	country = SAR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = LOM
			exists = VEN
			year = 1856 
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1845 }
	offset = 10
	deathdate = { year = 1856 }

	action_a = {
		command = { type = ai which = "SARmiddle.ai" }
		}
}

#########################################################################
# ITA AI Switch  (by OHGamer)  
#########################################################################
event = {
	id = 30317
	random = no
	country = ITA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1890
			owned = { province = 1303 data = FRA } #French takeover Tunisia
			exists = HUN  #austria falling apart
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "ITAlate.ai" }
		}
}

#########################################################################
# HOL AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30318
	random = no
	country = HOL

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			year = 1865
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1860 }
	offset = 10
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "HOLmiddle.ai" }
		}
}

#########################################################################
# HOL AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30319
	random = no
	country = HOL

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 2559 data = HOL } #Dutch take over Bali
			year = 1895
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 10
	deathdate = { year = 1905 }

	action_a = {
		command = { type = ai which = "HOLlate.ai" }
		}
}
#########################################################################
# NIP AI Switch 2 (by OHGamer) [Switch 1 is 30153]
#########################################################################
event = {
	id = 30320
	random = no
	country = NIP

	trigger = {
		ai = yes
		atwar = no
		civilized = yes
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "NIPlate.ai" }
		}
}

#########################################################################
# POR AI Switch  (by OHGamer)  
#########################################################################
event = {
	id = 30321
	random = no
	country = POR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 2495 data = POR } #Successfully colonize interior Angola
			year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "PORlate.ai" }
		}
}


#########################################################################
# CHI AI Switch 1 (by OHGamer)  
#########################################################################
event = {
	id = 30322
	random = no
	country = CHI

	trigger = {
		ai = yes
		atwar = no
		OR = {
		event = 12516 #end 2nd Opium War
		year = 1860
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1854 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "CHImiddle.ai" }
		}
}

#########################################################################
# CHI AI Switch 2 (by OHGamer)  
#########################################################################
event = {
	id = 30323
	random = no
	country = CHI

	trigger = {
		ai = yes
		atwar = no
		OR = {
		civilized = yes
		event = 12520 #1898 Reform Edicts
		won_war = { country = NIP country = CHI }
		year = 1899
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "CHIlate.ai" }
		}
}

#########################################################################
# SWE AI Switch 1 (by OHGamer)  
#########################################################################
event = {
	id = 30324
	random = no
	country = SWE

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 305 data = GER } #kiel in GER hands
			year = 1866
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1860 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "SWEmiddle.ai" }
		}
}

#########################################################################
# SWE AI Switch 1 (by OHGamer)  
#########################################################################
event = {
	id = 30325
	random = no
	country = SWE

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = FIN #Finland breaks/broken from RUS
			year = 1890
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1885 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "SWElate.ai" }
		}
}


#########################################################################
# FRA AI Switch 2 (No Aggresive GER) (by OHGamer)
#########################################################################
event = {
	id = 30326
	random = no
	country = FRA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 30184
			year = 1875
			}
		NOT = {
			event = 7237 #La Commune
		}		
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1872 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "FRAlateNOGER.ai" }
		}
}

#########################################################################
# SWI AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30327
	random = no
	country = SWI

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1872 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "SWIlate.ai" }
		}
}


#########################################################################
# AUS AI Switch 1a (GER Exists) (by OHGamer)
#########################################################################
event = {
	id = 30328
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		exists = GER
		OR = {
			event = 4627
			won_war = { country = PRU country = AUS }
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1871 }
	offset = 10
	deathdate = { year = 1896 }

	action_a = {
		command = { type = ai which = "AUSmiddleGER.ai" }
		command = { type = sleepevent which = 30329 }
		}
}


#########################################################################
# AUS AI Switch 1b (GER Does Not Exist) (by OHGamer)
#########################################################################
event = {
	id = 30329
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 4627
			won_war = { country = AUS country = PRU }
			}
		NOT = {
			exists = GER
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1871 }
	offset = 10
	deathdate = { year = 1896 }

	action_a = {
		command = { type = ai which = "AUSmiddleNOGER.ai" }
		command = { type = sleepevent which = 30328 }
		}
}

#########################################################################
# AUS AI Switch 2a (GER Exists) (by OHGamer)
#########################################################################
event = {
	id = 30330
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		exists = GER
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1895 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "AUSlateGER.ai" }
		command = { type = sleepevent which = 30331 }
		}
}


#########################################################################
# AUS AI Switch 2b (GER Does Not Exist) (by OHGamer)
#########################################################################
event = {
	id = 30331
	random = no
	country = AUS

	trigger = {
		ai = yes
		atwar = no
		NOT = {
			exists = GER
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1895 }
	offset = 10
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "AUSlateNOGER.ai" }
		command = { type = sleepevent which = 30330 }
		}
}

#########################################################################
# BRZ AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30332
	random = no
	country = BRZ

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = BRZ country = PRG }
			year = 1870
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1866 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "BRZmiddle.ai" }
		command = { type = relation which = PRG value = 100 } #To halt cycle of wars  
		}
}

#########################################################################
# BRZ AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30333
	random = no
	country = BRZ

	trigger = {
		ai = yes
		atwar = no
		OR = {
			slavery = no
			year = 1895
			}		
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "BRZlate.ai" }
		}
}

#########################################################################
# ARG AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30334
	random = no
	country = ARG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = ARG country = PRG }
			year = 1870
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1866 }
	offset = 10
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "ARGmiddle.ai" }
		command = { type = relation which = PRG value = 100 } #To halt cycle of wars  
		}
}

#########################################################################
# ARG AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30335
	random = no
	country = ARG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 2772 data = ARG } #complete colonization Patagonia
			year = 1895
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 10
	deathdate = { year = 1910 }

	action_a = {
		command = { type = ai which = "ARGlate.ai" }
		}
}

#########################################################################
# CHL AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30336
	random = no
	country = CHL

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 2401 data = CHL } #conquered Atacama
			year = 1885
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "CHLlate.ai" }
		command = { type = relation which = PRG value = 100 } #To halt cycle of wars  
		}
}

#########################################################################
# CLM AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30337
	random = no
	country = CLM

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = COS
			year = 1885
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "CLMlate.ai" }
		}
}

#########################################################################
# PEU AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30338
	random = no
	country = PEU

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = BOL  
			year = 1855
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 10
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "PEUmiddle.ai" }
		command = { type = relation which = BOL value = 150 } #To halt cycle of wars  
		}
}

#########################################################################
# PEU AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30339
	random = no
	country = PEU

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1890
			owned = { province = 2401 data = CHL } #conquered Atacama
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1884 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "PEUlate.ai" }
		command = { type = relation which = CHL value = 150 } #To halt cycle of wars  
		}
}

#########################################################################
# VNZ AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30340
	random = no
	country = VNZ

	trigger = {
		ai = yes
		atwar = no
		OR = {
			owned = { province = 2111 data = VNZ } #got Guyana
			owned = { province = 2074 data = VNZ } #got Puerto Narino
			year = 1885
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "VNZlate.ai" }
		}
}

#########################################################################
# CAN AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30341
	random = no
	country = CAN

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 21101
			event = 21102
			event = 21103
 			year = 1900
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1897 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "CANlate.ai" }
		}
}

#########################################################################
# GRE AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30342
	random = no
	country = GRE

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = RUS country = TUR }
			won_war = { country = GRE country = TUR }
 			owned = { province = 1332 data = GRE } #Owns Corfu
			year = 1885
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 10
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "GRElate.ai" }
		}
}

#########################################################################
# ANN AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30343
	random = no
	country = ANN

	trigger = {
		ai = yes
		atwar = no
		OR = {
			civilized = yes
			year = 1900
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1920 }

	action_a = {
		command = { type = ai which = "ANNCivilized.ai" }
		}
}

#########################################################################
# BAY AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30344
	random = no
	country = BAY

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "BAY_late.ai" }
		}
}

#########################################################################
# HAN AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30345
	random = no
	country = HAN

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "HAN_late.ai" }
		}
}

#########################################################################
# WUR AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30346
	random = no
	country = WUR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "WUR_late.ai" }
		}
}

#########################################################################
# BAD AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30347
	random = no
	country = BAD

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "BAD_late.ai" }
		}
}

#########################################################################
# NGF AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30348
	random = no
	country = NGF

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1895
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 20
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "NGF_late.ai" }
		}
}

#########################################################################
# SAX AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30349
	random = no
	country = SAX

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = GER
			exists = PRU
			year = 1875
			}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1873 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "SAX_late.ai" }
		}
}

#########################################################################
# SIC AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30350
	random = no
	country = SIC

	trigger = {
		ai = yes
		atwar = no
		OR = {
		exists = SAR
		exists = PAP
		exists = TUS
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1863 }
	offset = 20
	deathdate = { year = 1875 }

	action_a = {
		command = { type = ai which = "SICMiddle.ai" }
		}
}

#########################################################################
# PAP AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30351
	random = no
	country = PAP

	trigger = {
		ai = yes
		atwar = no
		OR = {
		exists = SAR
		exists = SIC
		exists = TUS
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1863 }
	offset = 20
	deathdate = { year = 1875 }

	action_a = {
		command = { type = ai which = "PAPMiddle.ai" }
		}
}
#########################################################################
# ORA AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30352
	random = no
	country = ORA

	trigger = {
		ai = yes
		atwar = no
		OR = {
		exists = ZUL
		year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "ORAlate.ai" }
		}
}

#########################################################################
# TRN AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30353
	random = no
	country = TRN

	trigger = {
		ai = yes
		atwar = no
		OR = {
		exists = ZUL
		year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 20
	deathdate = { year = 1890 }

	action_a = {
		command = { type = ai which = "TRNlate.ai" }
		}
}

#########################################################################
# PRG AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30354
	random = no
	country = PRG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = BRZ country = PRG }
			won_war = { country = ARG country = PRG }
 			year = 1868
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1865 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "PRGlate.ai" }
		}
}

#########################################################################
# SIA AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30355
	random = no
	country = SIA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			civilized = yes
 			owned = { province = 2317 data = FRA } #Cambodia falls to FRA or ENG  
 			owned = { province = 2011 data = FRA }  
 			owned = { province = 2012 data = FRA }  
			owned = { province = 2317 data = ENG }  
 			owned = { province = 2011 data = ENG }  
 			owned = { province = 2012 data = ENG }  
 			year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1875 }
	offset = 20
	deathdate = { year = 1895 }

	action_a = {
		command = { type = ai which = "SIAlate.ai" }
		}
}

#########################################################################
# URU AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30356
	random = no
	country = URU

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = BRZ country = PRG }
			won_war = { country = ARG country = PRG }
 			year = 1868
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1865 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "URUlate.ai" }
		}
}

#########################################################################
# COS AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30357
	random = no
	country = COS

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1855
			NOT = {
				exists = UCA
			}	
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "COS.ai" }
		}
}

#########################################################################
# GUA AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30358
	random = no
	country = GUA

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1855
			NOT = {
				exists = UCA
			}	
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "GUA.ai" }
		}
}

#########################################################################
# HON AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30359
	random = no
	country = HON

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1855
			NOT = {
				exists = UCA
			}	
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "HON.ai" }
		}
}

#########################################################################
# ELS AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30360
	random = no
	country = ELS

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1855
			NOT = {
				exists = UCA
			}	
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "ELS.ai" }
		}
}

#########################################################################
# NIC AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30361
	random = no
	country = NIC

	trigger = {
		ai = yes
		atwar = no
		OR = {
			year = 1855
			NOT = {
				exists = UCA
			}	
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "NIC.ai" }
		}
}

#########################################################################
# ECU AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30362
	random = no
	country = ECU

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = CLM country = ECU }
			won_war = { country = PEU country = ECU }
 			year = 1870
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1865 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "ECUlate.ai" }
		}
}

#########################################################################
# HAI AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30363
	random = no
	country = HAI

	trigger = {
		ai = yes
		atwar = no
		OR = {
			exists = DOM
			year = 1860
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1850 }
	offset = 20
	deathdate = { year = 1880 }

	action_a = {
		command = { type = ai which = "HAIlate.ai" }
		}
}

#########################################################################
# KOR AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30364
	random = no
	country = KOR

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 12517 #Treaty of Aigun
			year = 1865
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1860 }
	offset = 20
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "KORlate.ai" }
		}
}

#########################################################################
# PER AI Switch 1 (by OHGamer)
#########################################################################
event = {
	id = 30365
	random = no
	country = PER

	trigger = {
		ai = yes
		atwar = no
		OR = {
			civilized = yes
			won_war = { country = RUS country = PER }
			year = 1865
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1860 }
	offset = 20
	deathdate = { year = 1870 }

	action_a = {
		command = { type = ai which = "PERmiddle.ai" }
		}
}

#########################################################################
# PER AI Switch 2 (by OHGamer)
#########################################################################
event = {
	id = 30366
	random = no
	country = PER

	trigger = {
		ai = yes
		atwar = no
		OR = {
			civilized = yes
 			owned = { province = 1061 data = RUS }  
			year = 1895
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1890 }
	offset = 20
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "PERlate.ai" }
		}
}

#########################################################################
# BOL AI Switch (by OHGamer)
#########################################################################
event = {
	id = 30596
	random = no
	country = BOL

	trigger = {
		ai = yes
		atwar = no
		OR = {
			won_war = { country = CHL country = BOL }
			year = 1885
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { year = 1880 }
	offset = 20
	deathdate = { year = 1900 }

	action_a = {
		command = { type = ai which = "BOLlate.ai" }
		}
}

##Border Rectification AI helpers

################################################## 
# French lands in S Italy cede to Italy (by OHGamer)
################################################## 
event = {
	id = 30563
	random = no
	country = FRA

	trigger = {
		exists = ITA
		ai = yes
		ai = ITA
		OR = {
			event = 7210
			event = 7211
			event = 7212
			event = 7213
			event = 7214
			event = 7215
			event = 7216
			event = 7217
			}
		OR = {
         		owned = { province = 824 data = FRA }  #Bergamo                #Europe-South Europe-Lombardia             ITA
 			owned = { province = 825 data = FRA }  #Milano
			owned = { province = 826 data = FRA }  #Brescia
			owned = { province = 737 data = FRA }  #Napoli                 #Europe-South Europe-Napoli
			owned = { province = 856 data = FRA }  #Foggia
			owned = { province = 964 data = FRA }  #Bari
			owned = { province = 1288 data = FRA }  #Potenza
			owned = { province = 1289 data = FRA }  #Reggio
 			owned = { province = 1294 data = FRA }  #Salerno
			owned = { province = 1340 data = FRA }  #Taranto
			owned = { province = 1341 data = FRA }  #Catanzaro
			owned = { province = 840 data = FRA }  #Parma                  #Europe-South Europe-Parma-Modena
 			owned = { province = 841 data = FRA }  #Modena
			 owned = { province = 843 data = FRA }  #Lucca
			 owned = { province = 815 data = FRA }  #Torino                 #Europe-South Europe-Piemonte
 			 owned = { province = 816 data = FRA }  #Savona
			owned = { province = 817 data = FRA }  #Genova
 			owned = { province = 818 data = FRA }  #Alessandria
			 owned = { province = 819 data = FRA }  #Aosta
 			 owned = { province = 820 data = FRA }  #Novara
			owned = { province = 842 data = FRA }  #Ferrara                #Europe-South Europe-Romagna
			 owned = { province = 844 data = FRA }  #Bologna
			 owned = { province = 845 data = FRA }  #Rimini
			  owned = { province = 738 data = FRA }  #Sassari                #Europe-South Europe-Sardinia
			  owned = { province = 1299 data = FRA }  #Cagliari
			 owned = { province = 1295 data = FRA }  #Palermo                #Europe-South Europe-Sicilia
 			 owned = { province = 1297 data = FRA }  #Messina
			 owned = { province = 1298 data = FRA }  #Catania
			 owned = { province = 846 data = FRA }  #Firenze                #Europe-South Europe-Toscana
			 owned = { province = 847 data = FRA }  #Massa
			 owned = { province = 848 data = FRA }  #Livorno
			 owned = { province = 849 data = FRA }  #Siena
			 owned = { province = 851 data = FRA }  #Grosseto
			 owned = { province = 850 data = FRA }  #Ancona                 #Europe-South Europe-Umbria
			 owned = { province = 852 data = FRA }  #Perugia
			 owned = { province = 854 data = FRA }  #L'Aquila
			} 
		NOT = {
			war = { country = ITA country = FRA }
			won_war = { country = FRA country = ITA }
			}
		}

	date = { day = 29 month = december year = 1857 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = secedestate which = ITA value = 824 when = 0 } 
		command = { type = secedestate which = ITA value = 737 when = 0 } 
		command = { type = secedestate which = ITA value = 840 when = 0 } 
		command = { type = secedestate which = ITA value = 815 when = 0 } 
		command = { type = secedestate which = ITA value = 842 when = 0 } 
		command = { type = secedestate which = ITA value = 738 when = 0 } 
		command = { type = secedestate which = ITA value = 1295 when = 0 } 
		command = { type = secedestate which = ITA value = 846 when = 0 } 
		command = { type = secedestate which = ITA value = 854 when = 0 } 
	}
}


################################################## 
# Ottomans regain Palestine-Syria (AI-AI) (by OHGamer)
################################################## 
event = {
	id = 30513
	random = no
	country = EGY

	trigger = {
		exists = TUR
		ai = yes
		ai = TUR
		event = 8100
		won_war =  { country = TUR country = EGY }
		owned = { province = 1380 data = TUR } #S Anatolia is Turkish
		owned = { province = 1011 data = TUR }  
		owned = { province = 1037 data = TUR }  
		OR = {
			owned = { province = 1401 data = TUR } #Palestine 
			owned = { province = 1402 data = TUR }  
			owned = { province = 1400 data = TUR }  
			owned = { province = 1408 data = TUR }  
			owned = { province = 1406 data = TUR }  
			owned = { province = 1405 data = TUR }  
			owned = { province = 1403 data = TUR }  
			owned = { province = 1398 data = TUR }  
			owned = { province = 1388 data = TUR } #lebanon 
			owned = { province = 1386 data = TUR }  
			owned = { province = 1397 data = TUR }  
			owned = { province = 1399 data = TUR }  
			owned = { province = 1385 data = TUR }  
			owned = { province = 1389 data = TUR } #syria  
			owned = { province = 1387 data = TUR }  
			owned = { province = 1412 data = TUR }  
			owned = { province = 1411 data = TUR }  
			owned = { province = 1384 data = TUR } 
		} 
		OR = {
			owned = { province = 1356 data = EGY }  #Crete
			owned = { province = 1355 data = EGY }  
			owned = { province = 1401 data = EGY } #Palestine 
			owned = { province = 1402 data = EGY }  
			owned = { province = 1400 data = EGY }  
			owned = { province = 1408 data = EGY }  
			owned = { province = 1406 data = EGY }  
			owned = { province = 1405 data = EGY }  
			owned = { province = 1403 data = EGY }  
			owned = { province = 1398 data = EGY }  
			owned = { province = 1388 data = EGY } #lebanon 
			owned = { province = 1386 data = EGY }  
			owned = { province = 1397 data = EGY }  
			owned = { province = 1399 data = EGY }  
			owned = { province = 1385 data = EGY }  
			owned = { province = 1389 data = EGY } #syria  
			owned = { province = 1387 data = EGY }  
			owned = { province = 1412 data = EGY }  
			owned = { province = 1411 data = EGY }  
			owned = { province = 1384 data = EGY } 
		} 
		NOT = {
			war = { country = TUR country = EGY }
			}
		}

	date = { day = 2 month = january year = 1838 }
	offset = 5
	deathdate = { day = 30 month = december year = 1858 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = secedestate which = TUR value = 1356 when = 0 } 
		command = { type = secedeprovince  which = TUR  value = 1401 } 
		command = { type = secedeprovince  which = TUR  value = 1402 } 
		command = { type = secedeprovince  which = TUR  value = 1400 } 
		command = { type = secedeprovince  which = TUR  value = 1408 } 
		command = { type = secedeprovince  which = TUR  value = 1406 } 
		command = { type = secedeprovince  which = TUR  value = 1405 } 
		command = { type = secedeprovince  which = TUR  value = 1403 } 
		command = { type = secedeprovince  which = TUR  value = 1398 } 
		command = { type = secedestate which = TUR value = 1388 when = 0 } 
		command = { type = secedestate which = TUR value = 1384 when = 0 } 
		command = { type = secedestate which = TUR value = 1412 when = 0 } 
		command = { type = convert_pop_type which = soldiers value = farmers when = 85 } 
	}
}


################################################## 
# Natal Reverts To England (by OHGamer)
################################################## 
event = {
	id = 30514
	random = no
	country = ENG

	trigger = {
		exists = NAL
		ai = yes
		ai = NAL
		NOT = {
			war = { country = NAL country = ENG }
			}
		}

	date = { day = 8 month = august year = 1843 }  
	offset = 5
	deathdate = { day = 30 month = december year = 1858 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit  which = NAL } 
	}
}

################################################## 
# Ionian Islands Revert To Greece (by OHGamer)
################################################## 
event = {
	id = 30564
	random = no
	country = GRE

	trigger = {
		exists = ENG
		exists = ION
		ai = yes
		ai = ION
		ai = ENG
		atwar = no
		NOT = {
			is_dominion = GRE
			is_satellite = GRE
			war = { country = GRE country = ENG }
			war = { country = ION country = ENG }
			atwar = ENG
			}
		}

	date = { day = 5 month = january year = 1864 }
	offset = 10
	deathdate = { day = 30 month = december year = 1874 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = inherit  which = ION } 
	}
}

#########################################################################
#  USA offers to buy New Mexico (AI-AI)
#########################################################################
event = {
	id = 30515
	random = no
	country = USA

	trigger = {
		ai = yes
		exists = MEX	
		ai = mex
		won_war =  { country = USA country = MEX }
		NOT = { exists = TEX }
		NOT = { war = { country = USA  country = MEX } }
		OR = {
		owned = { province = 1185 data = USA } # Houston
		owned = { province = 1186 data = USA } # Austin
		owned = { province = 1191 data = USA } # Dallas
		owned = { province = 1165 data = MEX } # Albuquerque
		owned = { province = 1166 data = MEX } # Roswell
		}
		OR = {
			owned = { province = 512 data = MEX } #NV
			owned = { province = 513 data = MEX }
			owned = { province = 530 data = MEX }
			owned = { province = 537 data = MEX } #CO
			owned = { province = 538 data = MEX }
			owned = { province = 539 data = MEX }
			uncolonized = 537 #if CO is still not colonized
			owned = { province = 567 data = MEX } #OK
			owned = { province = 1192 data = MEX }
			owned = { province = 1193 data = MEX }
			uncolonized = 567 #if OK is still not colonized
			owned = { province = 527 data = MEX } #UT
			owned = { province = 528 data = MEX }
			owned = { province = 529 data = MEX }
			owned = { province = 514 data = MEX } #CA
			owned = { province = 515 data = MEX }
			owned = { province = 516 data = MEX }
			owned = { province = 517 data = MEX }
			owned = { province = 518 data = MEX }
			owned = { province = 519 data = MEX }
			owned = { province = 520 data = MEX }
			owned = { province = 521 data = MEX }
			owned = { province = 522 data = MEX }
			owned = { province = 1143 data = MEX }
			owned = { province = 2859 data = MEX } #TX
			owned = { province = 1190 data = MEX }
			owned = { province = 1144 data = MEX }
			owned = { province = 1191 data = MEX }
			owned = { province = 1186 data = MEX }
			owned = { province = 1185 data = MEX }
			owned = { province = 1187 data = MEX }
			owned = { province = 1188 data = MEX }
			}
	}

	name = "EVT_14102_NAME"
	desc = "EVT_14102_DESC"
	style = 0

	date = { day = 1 month = january year = 1845 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME7223A" # Make an offer
		command = { type = trigger which = 30516 } # Mexico
		command = { type = treasury value = -10000 }
		command = { type = sleepevent which = 14124 }	
		command = { type = sleepevent which = 14102 }	
		command = { type = sleepevent which = 14198 }	
		command = { type = sleepevent which = 14199 }	
	}
}

################################################## 
# AI-AI Mexican Cession Event (by OHGamer)
################################################## 
event = {
	id = 30516
	random = no
	country = MEX

	#triggered by 30515 

	name = "EVT_14102_NAME"
	desc = "EVT_14102_DESC"
	style = 0

	action_a = {
		name = "ACCEPT" # Accept
		command = { type = secedestate which = USA value = 512 when = 0  } 
		command = { type = secedestate which = USA value = 527 when = 0  } 
		command = { type = secedestate which = USA value = 2859 when = 0  } 
		command = { type = secedestate which = USA value = 537 when = 0  } 
		command = { type = secedestate which = USA value = 1165 when = 0  } 
		command = { type = secedestate which = USA value = 567 when = 0 }
		command = { type = secedeprovince  which = USA  value = 523 }
		command = { type = secedeprovince  which = USA  value = 531 }
		command = { type = secedeprovince  which = USA  value = 532 }
		command = { type = secedeprovince  which = USA  value = 514 }
		command = { type = secedeprovince  which = USA  value = 515 }
		command = { type = secedeprovince  which = USA  value = 516 }
		command = { type = secedeprovince  which = USA  value = 517 }
		command = { type = secedeprovince  which = USA  value = 518 }
		command = { type = secedeprovince  which = USA  value = 519 }
		command = { type = secedeprovince  which = USA  value = 520 }
		command = { type = secedeprovince  which = USA  value = 521 }
		command = { type = secedeprovince  which = USA  value = 522 }
		command = { type = secedeprovince  which = USA  value = 1143 }
		command = { type = treasury value = 10000 }
		command = { type = secedestate which = USA value = 130 when = 0  } #Washington (if Mex had won in earlier war, but gets defeated, should retreat back to modern borders)
		command = { type = secedestate which = USA value = 131 when = 0  } #Oregon
		command = { type = secedestate which = USA value = 140 when = 0  } #Idaho
		command = { type = secedestate which = USA value = 536 when = 0  } #Wyoming
		command = { type = secedestate which = USA value = 526 when = 0  } #Montana
		command = { type = secedestate which = USA value = 1181 when = 0  } #Louisiana
		command = { type = secedestate which = USA value = 1179 when = 0  } #Arkansas
		command = { type = secedestate which = USA value = 541 when = 0  } #Missouri
		command = { type = secedestate which = USA value = 526 when = 0  } #Kansas
		command = { type = secedestate which = USA value = 561 when = 0  } #Nebraska
	}
}

################################################## 
# Schleswig War 1848 AI-AI Restore Peace - AUSTRIA
################################################## 
event = {
	id = 30517
	random = no
	country = AUS

	trigger = {
		exists = DAN
		ai = yes
		ai = DAN
		OR = {
		event = 1513  
		event = 4617 
		} 
		war = { country = DAN country = AUS }
		NOT = {
			war = { country = DAN country = PRU }
			}
		}

	date = { day = 3 month = january year = 1847 }
	offset = 31
	deathdate = { day = 30 month = december year = 1860 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = DAN value = 0 } 
	}
}


################################################## 
# Schleswig War 1864 AI-AI Restore Peace - AUSTRIA
################################################## 
event = {
	id = 30518
	random = no
	country = AUS

	trigger = {
		exists = DAN
		ai = yes
		ai = DAN
		OR = {
		event = 1514  
		event = 4618
		}  
		war = { country = DAN country = AUS }
		NOT = {
			war = { country = DAN country = PRU }
			}
		}

	date = { day = 5 month = january year = 1863 }
	offset = 10
	deathdate = { day = 30 month = december year = 1870 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = DAN value = 0 } 
	}
}

###Crimean War Restore Peace

################################################## 
# Crimean War AI-AI Restore Peace - TURKEY
################################################## 
event = {
	id = 30519
	random = no
	country = TUR

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 1111
		OR = {
		won_war =  { country = ENG country = RUS }
		event = 6942 #Britain in Crimean War
		}
		OR = {
		won_war =  { country = FRA country = RUS }
		event = 7246 #France in Crimean War
		}
		war = { country = TUR country = RUS }
		NOT = {
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 0 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - FRANCE
################################################## 
event = {
	id = 30520
	random = no
	country = FRA

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 7246 #France in Crimean War
		war = { country = FRA country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 0 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - PRUSSIA
################################################## 
event = {
	id = 30521
	random = no
	country = PRU

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 4637 #Prussia in Crimean War
		war = { country = PRU country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = FRA country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - AUSTRIA
################################################## 
event = {
	id = 30522
	random = no
	country = AUS

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 1526 #Austria in Crimean War
		war = { country = AUS country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = FRA country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - SARDINIA
################################################## 
event = {
	id = 30523
	random = no
	country = SAR

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 5805 #Sardinia in Crimean War
		war = { country = SAR country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = FRA country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 0 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - SWEDEN
################################################## 
event = {
	id = 30524
	random = no
	country = SWE

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		OR = {
		event = 6605 #Sweden in Crimean War
		event = 6606 #Sweden in Crimean War
		}
		war = { country = SWE country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = FRA country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - Spain
################################################## 
event = {
	id = 30525
	random = no
	country = SPA

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 7246 #France in Crimean War (that is what usually gets Spain in)
		war = { country = SPA country = RUS }
		NOT = {
			war = { country = TUR country = RUS }
			war = { country = FRA country = RUS }
			war = { country = ENG country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 0 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - Britain
################################################## 
event = {
	id = 30597
	random = no
	country = ENG

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		event = 1111
		OR = {
		war =  { country = ENG country = RUS }
		event = 6942 #Britain in Crimean War
		}
		NOT = {
			war = { country = FRA country = RUS }
			war = { country = TUR country = RUS }
			}
		}

	date = { day = 4 month = july year = 1853 }
	offset = 15
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 0 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - MOLDAVIA
################################################## 
event = {
	id = 30598
	random = no
	country = MOL

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		exists = TUR
		ai = TUR
		event = 1111
		war = { country = MOL country = RUS }
		}

	date = { day = 4 month = july year = 1853 }
	offset = 5
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - WALLACHIA
################################################## 
event = {
	id = 30599
	random = no
	country = WAL

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		exists = TUR
		ai = TUR
		event = 1111
		war = { country = WAL country = RUS }
		}

	date = { day = 4 month = july year = 1853 }
	offset = 5
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Crimean War AI-AI Restore Peace - SERBIA
################################################## 
event = {
	id = 30800
	random = no
	country = SER

	trigger = {
		exists = RUS
		ai = yes
		ai = RUS
		exists = TUR
		ai = TUR
		event = 1111
		war = { country = SER country = RUS }
		}

	date = { day = 4 month = july year = 1853 }
	offset = 5
	deathdate = { day = 4 month = july year = 1862 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = RUS value = 1 } 
	}
}

################################################## 
# Mexican Intervention AI-AI Restore Peace - Prussia
################################################## 
event = {
	id = 30526
	random = no
	country = PRU

	trigger = {
		exists = MEX
		ai = yes
		ai = MEX
		event = 4600
		war = { country = MEX country = PRU }
		NOT = {
			war = { country = MEX country = FRA }
			}
		}

	date = { day = 5 month = january year = 1861 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = MEX value = 0 } 
	}
}

################################################## 
# Mexican Intervention AI-AI Restore Peace - SPAIN
################################################## 
event = {
	id = 30527
	random = no
	country = SPA

	trigger = {
		exists = MEX
		ai = yes
		ai = MEX
		event = 7708
		war = { country = MEX country = SPA }
		NOT = {
			war = { country = MEX country = FRA }
			}
		}

	date = { day = 5 month = january year = 1861 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = MEX value = 0 } 
	}
}

################################################## 
# Mexican Intervention AI-AI Restore Peace - Sardinia
################################################## 
event = {
	id = 30528
	random = no
	country = SAR

	trigger = {
		exists = MEX
		ai = yes
		ai = MEX
		event = 5800
		war = { country = MEX country = SAR }
		NOT = {
			war = { country = MEX country = FRA }
			}
		}

	date = { day = 5 month = january year = 1861 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = MEX value = 0 } 
	}
}

################################################## 
# Mexican Intervention AI-AI Restore Peace - England
################################################## 
event = {
	id = 30529
	random = no
	country = ENG

	trigger = {
		exists = MEX
		ai = yes
		ai = MEX
		event = 6900
		war = { country = MEX country = ENG }
		NOT = {
			war = { country = MEX country = FRA }
			}
		}

	date = { day = 5 month = january year = 1861 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = peace which = MEX value = 0 } 
	}
}

#########################################################################
#  The Union of South Africa Prep - ORA annexed (AI-AI)
#########################################################################
event = {
	id = 30560
	random = no
	country = ENG

	trigger = {
		ai = yes
		exists = ORA
		ai = ORA
		NOT = {
			war = { country = ENG country = ORA }
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 30 month = june year = 1910 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "AI_EVENT" 
		command = { type = inherit which = ORA }
	}
}

#########################################################################
#  The Union of South Africa Prep - TRN annexed (AI-AI)
#########################################################################
event = {
	id = 30561
	random = no
	country = ENG

	trigger = {
		ai = yes
		exists = TRN
		ai = TRN
		NOT = {
			war = { country = ENG country = TRN }
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	date = { day = 30 month = june year = 1910 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "AI_EVENT" 
		command = { type = inherit which = TRN }
	}
}

#########################################################################
#  The Union of South Africa (AI-AI)
#########################################################################
event = {
	id = 30562
	random = no
	country = ENG

	trigger = {
		ai = yes
		atwar = no
		OR = {
			event = 30560
			event = 30561
			}
	}

	name = "EVT_6926_NAME"
	desc = "EVT_6926_DESC"
	style = 0

	date = { day = 10 month = july year = 1910 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME6926A" # Give the South Africans Their State
		command = { type = prestige value = 1 }
		command = { type = make_dominion which = SAF }
	}
}


#AI-AI Colonial Wars Helper

################################################## 
# Colonial Expansion : Britain Into Egypt
################################################## 
event = {
	id = 30530
	random = no
	country = ENG

	trigger = {
		exists = EGY
		ai = yes
		ai = EGY
		atwar = no
		random = 5
		NOT = {
			atwar = EGY
			is_satellite = EGY			
			alliance = { country = EGY country = FRA }
			alliance = { country = EGY country = GER }
			alliance = { country = EGY country = TUR }
			alliance = { country = EGY country = RUS }
				}
		}

	date = { day = 5 month = january year = 1875 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = EGY } 
		command = { type = relation  which = EGY  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Holland Into Atjeh
################################################## 
event = {
	id = 30531
	random = no
	country = HOL

	trigger = {
		exists = ATJ
		ai = yes
		ai = ATJ
		atwar = no
		random = 5
		OR = {
		owned = { province = 2298 data = HOL }  
		owned = { province = 2284 data = HOL } 
			} 
		NOT = {
			atwar = ATJ
			is_satellite = ATJ			
			alliance = { country = ATJ country = FRA }
			alliance = { country = ATJ country = GER }
			alliance = { country = ATJ country = ENG }
			alliance = { country = ATJ country = RUS }
				}
		}

	date = { day = 5 month = january year = 1874 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = ATJ } 
		command = { type = relation  which = ATJ  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Germany Into Zanzibar
################################################## 
event = {
	id = 30532
	random = no
	country = GER

	trigger = {
		exists = ZAN
		ai = yes
		ai = ZAN
		atwar = no
		random = 25
		owned = { province = 2508 data = ZAN }
		NOT = {
			atwar = ZAN
			is_satellite = ZAN			
			alliance = { country = ZAN country = FRA }
			alliance = { country = ZAN country = ENG }
			alliance = { country = ZAN country = RUS }
				}
		}

	date = { day = 5 month = january year = 1874 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = ZAN } 
		command = { type = relation  which = ZAN  value = -200 }
		command = { type = receiveprovince which = 2508 }
	}
}

################################################## 
# Colonial Expansion : France Into Madagascar
################################################## 
event = {
	id = 30533
	random = no
	country = FRA

	trigger = {
		exists = HOW
		ai = yes
		ai = HOW
		atwar = no
		random = 20
		NOT = {
			atwar = HOW
			is_satellite = HOW			
			alliance = { country = HOW country = GER }
			alliance = { country = HOW country = ENG }
			alliance = { country = HOW country = RUS }
				}
		}

	date = { day = 5 month = december year = 1894 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = HOW } 
		command = { type = relation  which = HOW  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Holland Into Bali
################################################## 
event = {
	id = 30534
	random = no
	country = HOL

	trigger = {
		exists = BAL
		ai = yes
		ai = BAL
		atwar = no
		OR = {
		owned = { province = 2549 data = HOL }  
		owned = { province = 2565 data = HOL } 
			} 
		random = 5
		NOT = {
			exists = JAV
			atwar = BAL
			is_satellite = BAL			
			alliance = { country = BAL country = GER }
			alliance = { country = BAL country = ENG }
			alliance = { country = BAL country = RUS }
			alliance = { country = BAL country = FRA }
				}
		}

	date = { day = 5 month = february year = 1859 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = BAL } 
		command = { type = relation  which = BAL  value = -200 }
	}
}


################################################## 
# Colonial Expansion : France Into Annam
################################################## 
event = {
	id = 30535
	random = no
	country = FRA

	trigger = {
		exists = ANN
		ai = yes
		ai = ANN
		atwar = no
		random = 5
		NOT = {
			atwar = ANN
			alliance = { country = ANN country = FRA }
			alliance = { country = ANN country = GER }
			alliance = { country = ANN country = ENG }
			alliance = { country = ANN country = RUS }
				}
		}

	date = { day = 5 month = february year = 1884 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = ANN } 
		command = { type = relation  which = ANN  value = -200 }
	}
}

################################################## 
# Colonial Expansion : France Into Luang Prabang
################################################## 
event = {
	id = 30536
	random = no
	country = FRA

	trigger = {
		exists = LUA
		ai = yes
		ai = LUA
		atwar = no
		random = 5
		OR = {
		owned = { province = 2001 data = FRA }  
		owned = { province = 2003 data = FRA } 
			} 
		NOT = {
			atwar = LUA
			is_satellite = LUA			
			alliance = { country = LUA country = GER }
			alliance = { country = LUA country = ENG }
			alliance = { country = LUA country = RUS }
				}
		}

	date = { day = 5 month = february year = 1892 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war  which = LUA } 
		command = { type = relation  which = LUA value = -200 }
	}
}

################################################## 
# Colonial Expansion : Japan Into Korea
################################################## 
event = {
	id = 30537
	random = no
	country = NIP

	trigger = {
		exists = KOR
		ai = yes
		ai = KOR
		atwar = no
		civilized = yes
		random = 20
		owned = { province = 1621 data = KOR }
		NOT = {
			atwar = KOR
			is_satellite = KOR			
			alliance = { country = KOR country = GER }
			alliance = { country = KOR country = ENG }
			alliance = { country = KOR country = RUS }
			alliance = { country = KOR country = FRA }
				}
		}

	date = { day = 5 month = february year = 1885 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = KOR  } 
		command = { type = relation  which = KOR  value = -200 }
		command = { type = receiveprovince which = 1621 }
	}
}

################################################## 
# Colonial Expansion : England Into Brunei
################################################## 
event = {
	id = 30538
	random = no
	country = ENG

	trigger = {
		exists = BRU
		ai = yes
		ai = BRU
		atwar = no
		random = 5
		NOT = {
			atwar = BRU
			is_satellite = BRU
			exists = MAL			
			alliance = { country = BRU country = GER }
			alliance = { country = BRU country = RUS }
			alliance = { country = BRU country = FRA }
			alliance = { country = BRU country = HOL }
				}
		}

	date = { day = 5 month = february year = 1875 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = BRU  } 
		command = { type = relation  which = BRU  value = -200 }
	}
}

################################################## 
# Colonial Expansion : England Into Sokoto
################################################## 
event = {
	id = 30539
	random = no
	country = ENG

	trigger = {
		exists = SOK
		ai = yes
		ai = SOK
		atwar = no
		random = 15
		OR = {
		owned = { province = 2197 data = ENG }  
		owned = { province = 2199 data = ENG } 
			} 
		NOT = {
			atwar = SOK
			is_satellite = SOK
			alliance = { country = SOK country = GER }
			alliance = { country = SOK country = RUS }
			alliance = { country = SOK country = FRA }
				}
		}

	date = { day = 5 month = february year = 1869 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = SOK } 
		command = { type = relation  which = SOK  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Russia Into Khiva
################################################## 
event = {
	id = 30540
	random = no
	country = RUS

	trigger = {
		exists = KHI
		ai = yes
		ai = KHI
		atwar = no
		random = 15
		OR = {
		owned = { province = 1068 data = RUS }  
		owned = { province = 1081 data = ENG } 
			} 
		NOT = {
			atwar = KHI
			is_satellite = KHI
			alliance = { country = KHI country = GER }
			alliance = { country = KHI country = ENG }
			alliance = { country = KHI country = FRA }
				}
		}

	date = { day = 5 month = february year = 1864 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = KHI } 
		command = { type = relation  which = KHI  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Russia Into Bukhara
################################################## 
event = {
	id = 30541
	random = no
	country = RUS

	trigger = {
		exists = BUK
		ai = yes
		ai = BUK
		atwar = no
		random = 15
		NOT = {
			exists = KHI
			atwar = BUK
			is_satellite = BUK
			alliance = { country = BUK country = GER }
			alliance = { country = BUK country = ENG }
			alliance = { country = BUK country = FRA }
				}
		}

	date = { day = 5 month = february year = 1866 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = BUK } 
		command = { type = relation  which = BUK  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Russia Into Kokand
################################################## 
event = {
	id = 30542
	random = no
	country = RUS

	trigger = {
		exists = KOK
		ai = yes
		ai = KOK
		atwar = no
		random = 15
		NOT = {
			exists = BUK
			atwar = KOK
			is_satellite = KOK
			alliance = { country = KOK country = GER }
			alliance = { country = KOK country = ENG }
			alliance = { country = KOK country = FRA }
				}
		}

	date = { day = 5 month = february year = 1869 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = KOK } 
		command = { type = relation  which = KOK  value = -200 }
	}
}

################################################## 
# Colonial Expansion : Ottomans Into Tripoli
################################################## 
event = {
	id = 30543
	random = no
	country = TUR

	trigger = {
		exists = TRI
		ai = yes
		ai = TRI
		atwar = no
		random = 25
		OR = {
		owned = { province = 1309 data = TUR }  
		owned = { province = 1342 data = TUR } 
			} 
		NOT = {
			atwar = TRI
			is_satellite = TRI
			alliance = { country = TRI country = GER }
			alliance = { country = TRI country = ENG }
			alliance = { country = TRI country = FRA }
				}
		}

	date = { day = 5 month = february year = 1869 }
	offset = 15
	deathdate = { day = 30 month = october year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = war which = TRI } 
		command = { type = relation  which = TRI  value = -200 }
	}
}

################################################## 
# UK Cedes ex-USA lands to Canada (AI Event)
################################################## 
event = {
	id = 30801
	random = no
	country = ENG

	trigger = {
		ai = yes
		event = 6946
		exists = CAN
		ai = CAN
		OR = {
		owned = { province = 118 data = ENG }#Washington State  
		owned = { province = 130 data = ENG }  
		owned = { province = 140 data = ENG } #Idaho  
		owned = { province = 141 data = ENG } #Montana  
		owned = { province = 148 data = ENG }  
		owned = { province = 164 data = ENG } #north dakota 
		owned = { province = 557 data = ENG }  
		owned = { province = 543 data = ENG } #Minnesota 
		owned = { province = 602 data = ENG } #Michigan 
		owned = { province = 606 data = ENG } #New York State  
		owned = { province = 623 data = ENG } #Maine  
		owned = { province = 624 data = ENG }  
		owned = { province = 625 data = ENG }  
		owned = { province = 626 data = ENG } #New Hampshire 
		owned = { province = 627 data = ENG } #Vermont 
		      }
		}

	date = { day = 1 month = january year = 1867 } 
	offset = 3
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = secedestate which = CAN value = 118 when = 0 } #WA	
		command = { type = secedestate which = CAN value = 131 when = 0 } #OR	
		command = { type = secedestate which = CAN value = 140 when = 0 } #ID	
		command = { type = secedestate which = CAN value = 141 when = 0 } #MT	
		command = { type = secedestate which = CAN value = 164 when = 0 } #ND	
		command = { type = secedestate which = CAN value = 559 when = 0 } #SD	
		command = { type = secedestate which = CAN value = 543 when = 0 } #MN	
		command = { type = secedestate which = CAN value = 569 when = 0 } #WS	
		command = { type = secedestate which = CAN value = 614 when = 0 } #MI	
		command = { type = secedestate which = CAN value = 601 when = 0 } #OH	
		command = { type = secedestate which = CAN value = 592 when = 0 } #PA	
		command = { type = secedestate which = CAN value = 606 when = 0 } #NY	
		command = { type = secedestate which = CAN value = 584 when = 0 } #NJ	
		command = { type = secedestate which = CAN value = 626 when = 0 } #NH	
		command = { type = secedestate which = CAN value = 627 when = 0 } #VT	
		command = { type = secedestate which = CAN value = 623 when = 0 } #ME	
		command = { type = secedestate which = CAN value = 629 when = 0 } #MA	
		command = { type = secedestate which = CAN value = 628 when = 0 } #RI	
		command = { type = secedestate which = CAN value = 572 when = 0 } #CT	
		command = { type = secedestate which = CAN value = 570 when = 0 } #IL	
		command = { type = secedestate which = CAN value = 604 when = 0 } #IN	
		command = { type = secedestate which = CAN value = 548 when = 0 } #IA	
			}
}

################################################## 
# UK Creates Dominion Of Columbia (AI Event)
################################################## 
event = {
	id = 30802
	random = no
	country = ENG

	trigger = {
		ai = yes
		NOT = {
		exists = CAN
		exists = COL
		}
		owned = { province = 124 data = ENG } #British Columbia 
		owned = { province = 125 data = ENG }  
		owned = { province = 117 data = ENG }  
		owned = { province = 136 data = ENG }  
		OR = {
		owned = { province = 118 data = ENG }#Washington State  
		owned = { province = 130 data = ENG }  
		owned = { province = 131 data = ENG }#Oregon 
		      }
		}

	date = { day = 1 month = january year = 1866 }
	offset = 15
	deathdate = { day = 30 month = december year = 1920 }

	name = "AI_EVENT"
	desc = "AI_EVENT"
	style = 0

	action_a = {
		ai_chance = 50
		command = { type = make_dominion which = COL }
			}
	action_b = {
		ai_chance = 50
		command = { }
			}
}

